<template>
	<view class="btn" :class="{disabled:disabled}" @click="onClickBtn">
		{{btnText}}
	</view>
</template>

<script>
	export default {
		props:{
			disabled:{
				type:Boolean,
				default: false
			},
			btnText:{
				type:String,
				default:'提交'
			}
		},
		methods: {
	       onClickBtn(){
			   if(this.disabled) return 
			   this.$emit('btnClick')
		   }
		}
	}
</script>

<style lang="scss">
	.btn{
		width: 688upx;
		height: 88upx;
		border-radius: 11upx;
		margin: 20upx auto;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 33upx;
		color: #fff;
		background: #31bb6d;
	}
	.disabled{
		background: #CCD0D8;
		color: #fff;
	}
</style>
